package com.aitao.exception;


import com.aitao.beans.MarkPoint;

/**
 * 执行异常处理类
 *
 * @Company QAX
 * @Author : ai.tao
 * @Create : 2022/1/13 16:49
 */
public abstract class ExecuteException extends RuntimeException {

    private static final long serialVersionUID = 684527824560806119L;

    private MarkPoint location = new MarkPoint();

    public ExecuteException() {
        super();
    }

    public ExecuteException(String message) {
        super(message);
    }

    public ExecuteException(String message, Throwable cause) {
        super(message, cause);
    }

    public ExecuteException(String msg, Throwable cause, MarkPoint location) {
        this(msg, cause);
        this.location = location;
    }

    public ExecuteException(Throwable cause) {
        super(cause);
    }

    public ExecuteException(String message, MarkPoint location) {
        super(message);
        this.location = location;
    }

    public ExecuteException(Throwable cause, MarkPoint location) {
        this(cause);
        this.location = location;
    }

    @Override
    public String toString() {
        return location.toString() + getMessage();
    }

    public MarkPoint getLocation() {
        return location;
    }

    public void setLocation(MarkPoint location) {
        this.location = location;
    }
}
